package cn.spring.com.eleven.service;


import cn.spring.com.spring.*;

@Component("userService")
@Scope("prototype")
public class UserService implements BeanNameAware, InitializingBean, UserInterface {

    @Autowired
    private OrderService orderService;

    private String beanName;

    private String name;

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("UserService初始化了");
    }

    public void test(){
        System.out.println(this.name);
    }

    public void setName(String newUserService) {
        this.name = newUserService;
    }

    @Override
    public void test1() {
        System.out.println("test1");
    }
}
